package biz.ezcom.design.pattern.iterator;

import java.util.ArrayList;
import java.util.List;

public class ConcreteAggregate implements Aggregate {

	private List<Object> items = new ArrayList<Object>();
	@Override
	public Iterator createIterator() {
		return new ConcreteIterator(this);
	}
	public int getCount(){
		return items.size();
	}
	public Object getItem(int index){
		return items.get(index);
	}
	public void add(Object item){
		items.add(item);
	}

}
